package org.example.demo;

import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * @ClassName copyDemo
 * @Description
 * @Author zhangsw
 * @Date 2020/11/9 16:25
 * @Version 1.0
 */
public class copyDemo {
    public static void main(String[] args) throws Exception {//3218-
        long startTime = System.currentTimeMillis();//11818-12893-13620
        FileInputStream fis = new FileInputStream("D:\\Users\\zhangsw\\Desktop\\Learn\\a.zip");
        FileOutputStream fos = new FileOutputStream("D:\\Users\\zhangsw\\Desktop\\Learn\\b.zip", true);
        byte[] bytes = new byte[1024 * 16];
        int len = 0;
        while ((len = fis.read(bytes)) != -1) {
            fos.write(bytes, 0, len);
        }
        fos.close();
        fis.close();
        long endTime = System.currentTimeMillis();
        System.err.println(endTime - startTime);
    }
}
